//The square-free number B1

#include "stdio.h"
#include "math.h"
#define IFINTX(x) if(sqrt((double)x) == (int)sqrt((double)x))
int main()
{
	int N=0;
	bool f=false;
	if (scanf("%d",&N)!=1||N<1) return printf("ERROR\n"),1;
	for (int i=2;i<N/2+1;i++)
	{
		if (N%i==0) IFINTX(i) f=true;
		if (f) break;
	}
	IFINTX(N) f=true;

	if (f) printf("YES\n");
	else printf("NO\n");

	return 0;
}

